home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / stack.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  37 lines

  1. Author: Jake Schwartz; comments by Joe Horn. 
  2.  
  3. Suppose we want to show 6 levels of the stack instead of just the normal 4.  
  4. Jake Schwartz wrote this one, called 'STACK': 
  5.  
  6. << 
  7. "6:                   "   @ initial 21-character string for line 6 
  8.   IF DEPTH 7 >=           @ if stack level 6 exists 
  9.   THEN 7 PICK ->STR       @    get it and convert to a string 
  10.   ELSE ""                 @    otherwise use a null string 
  11.   END 23 OVER SIZE        @ get size of object string 
  12. - 3 MAX SWAP REPL 1       @ position it right-justified in display string 
  13. DISP                      @ display in line one of LCD 
  14. "5:                   "   @ -- repeat 
  15.   IF DEPTH 6 >=           @    the same 
  16.   THEN 6 PICK ->STR       @    process 
  17.   ELSE ""                 @    for 
  18.   END 23 OVER SIZE        @    stack 
  19. - 3 MAX SWAP REPL 2       @    level 5 -- 
  20. DISP 1 FREEZE             @ and freeze the status area of the LCD 
  21. >> 
  22.  
  23. Now, save this as 'STACK', and save << DROP STACK >> as 'betaENTER'.  (The 
  24. beta character can be obtained by pressing [blue][B] in alpha mode.)  Then, 
  25. whenever you're in user mode with flag -63 set, you'll see a six-level 
  26. stack automatically after all operations!  Notice that non-operation keys, 
  27. such as ATTN, the shift keys, and menu keys restore the normal display. 
  28.  
  29. Of course, if you prefer, you may run STACK directly rather than using the 
  30. vectored enter method described above. 
  31.  
  32. Note well that STACK is not really a replacement for the normal 4-high stack 
  33. display; it blows away the user's LASTARGs. 
  34.  
  35. [Note: This program is obsoleted by an assembly-language version called 
  36. ALTD.  Try it; you'll like it!  -jkh-] 
  37.